package com.lzy.huijinjiazu.mvp.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;

import com.jess.arms.base.BaseActivity;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.ArmsUtils;

import com.lzy.huijinjiazu.di.component.DaggerSplashComponent;
import com.lzy.huijinjiazu.di.module.SplashModule;
import com.lzy.huijinjiazu.mvp.contract.SplashContract;
import com.lzy.huijinjiazu.mvp.presenter.SplashPresenter;

import com.lzy.huijinjiazu.R;


import static com.jess.arms.utils.Preconditions.checkNotNull;


public class SplashActivity extends BaseActivity<SplashPresenter> implements SplashContract.View {


    @Override
    public void setupActivityComponent(AppComponent appComponent) {
        DaggerSplashComponent //如找不到该类,请编译一下项目
                .builder()
                .appComponent(appComponent)
                .splashModule(new SplashModule(this))
                .build()
                .inject(this);
    }

    @Override
    public int initView(Bundle savedInstanceState) {
        return R.layout.activity_splash; //如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
    }

    @Override
    public void initData(Bundle savedInstanceState) {
        ArmsUtils.startActivity(MainActivity.class);
        finish();
    }


}
